<?php
/**
 * Template Name: My Venue Details
 */

get_header(); ?>

<div class="container">
    <h1><?php the_title() ?></h1>

    <div class="row-fluid">
    </div>

    <div class="row-fluid">
        <div class="span8">
            <div class="card grey">
                <h2 class="title">Details</h2>

                <form id="venue-details" style="margin:0;">

                    <?php
                    $posts = get_field('venue', 'user_'.get_user_id());
                    if ($posts):
                        foreach ($posts as $post):
                            setup_postdata($post); ?>

                    <fieldset>
                        <label>Name<span style="color:red;">*</span></label>
                        <input type="text" placeholder="" value="<?php the_field('name'); ?>">
                        <span class="help-block"></span>
                    </fieldset>
                    <fieldset>
                        <label>Address<span style="color:red;">*</span></label>
                        <textarea><?php the_field('address'); ?></textarea>
                        <span class="help-block"></span>
                    </fieldset>
                    <fieldset>
                        <label>Website</label>
                        <input type="text" placeholder="" value="<?php the_field('website'); ?>">
                        <span class="help-block">e.g. http://pitchwise.co.uk</span>
                    </fieldset>
                    <fieldset>
                        <label>Primary Contact Number</label>
                        <input type="text" placeholder="">
                        <span class="help-block"></span>
                    </fieldset>
                    <fieldset>
                        <label>Primary Contact Email</label>
                        <input type="text" placeholder="">
                        <span class="help-block"></span>
                    </fieldset>
                    <fieldset>
                        <label>Primary Contact Name</label>
                        <input type="text" placeholder="">
                        <span class="help-block"></span>
                    </fieldset>
                    <fieldset>
                        <label>Other Contact Details</label>
                        <textarea></textarea>
                        <span class="help-block"></span>
                    </fieldset>
                    <fieldset>
                        <label>Venue Image</label>
                        <textarea></textarea>
                        <span class="help-block"></span>
                    </fieldset>
                    <button type="submit" class="btn btn-primary">Submit</button>


                    <?php
                        endforeach;
                        wp_reset_postdata();
                    endif;
                    ?>
                </form>
            </div>
        </div>
        <div class="span4">
            <div class="card grey">
                <h2 class="title"></h2>

            </div>
        </div>
    </div>
</div>


<?php get_footer(); ?>